﻿using RStudio.UIFramwork;
using UnityEngine.EventSystems;


/// <summary>
/// 阻挡
/// </summary>
/// 
[UIDetail("UIAreaQuit", "UIAreaQuit")]
public class UIAreaQuit : UIWidget, IPointerClickHandler
{
    public void OnPointerClick(PointerEventData eventData)
    {
        bool isGet = transform.parent.TryGetComponent<UIBase>(out var output);

        if (!isGet) return;

        UIModuleCenter.Instance.SendToQueue(new UIEventArgs()
        {
            Type = output.GetType(),
            UIBase = output,
            UIEventType = UIEventType.Close
        });
    }
}